package br.com.wuo.karina.view;

import java.awt.Dimension;
import java.awt.GraphicsConfiguration;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import java.awt.Rectangle;
import java.util.ArrayList;
import java.util.List;

import javax.swing.JFrame;

public class Mensalidades extends JFrame {

	private static final long serialVersionUID = 1L;

	public Mensalidades() {
		super("Mensalidades");
		setDefaultCloseOperation(DISPOSE_ON_CLOSE);

		initialize();
		addListener();
		setFrameLayout();
		
		Dimension frameSize = new Dimension(500, 300);
		
		for (GraphicsDevice screen : getGraphicsDevices()) {
			GraphicsConfiguration gc = screen.getDefaultConfiguration();
			Rectangle sb = gc.getBounds();

			setBounds(sb.x + sb.width / 2 - frameSize.width / 2, sb.y
					+ sb.height / 2 - frameSize.height / 2, frameSize.width,
					frameSize.height);
		}
		
		setVisible(true);
	}

	public static List<GraphicsDevice> getGraphicsDevices() {
		List<GraphicsDevice> devices = new ArrayList<GraphicsDevice>();
		for (GraphicsDevice gd : GraphicsEnvironment
				.getLocalGraphicsEnvironment().getScreenDevices()) {
			if (gd.getType() == GraphicsDevice.TYPE_RASTER_SCREEN) {
				if (gd == GraphicsEnvironment.getLocalGraphicsEnvironment()
						.getDefaultScreenDevice()) {
					devices.add(0, gd);
				} else {
					devices.add(gd);
				}
			}
		}
		return devices;
	}

	public void setFrameLayout() {

	}

	// Método que cria as variáveis
	public void initialize() {

	}

	// Método que cria os listeners
	public void addListener() {

	}
}